<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
require("../../includes/appheader.php");
require("../../includes/functions.php");
//$city=$_GET['city'];
//$propertyType=$_GET['propertyType'];
//$offerType=$_GET['offerType'];

$properties=getLastProperties();
$selectedId=$_GET['selectedId'];
if($selectedId == null) $selectedId=0;
?>

<div id="resultGridHeader" class="resultGridHeader" >
<table class="resultTable" cellpadding="0" cellspacing="1" border="0" width="320px">
    <thead>
        <tr>
            <th width="80px">Tarih</th>
            <th width="70px">Durumu</th>
            <th width="75px">Tipi</th>
            <th width="50px">m<sup>2</sup> </th>
            <th width="50px">Fiyat</th>
        </tr>
    </thead>
</table>
</div>
<div id="resultGrid" class="resultGrid">
<table class="resultTable" cellpadding="0" cellspacing="1" border="0" width="320px">
    <tbody>
        <?php
        $i=1;
        foreach($properties as $property){
            ?>
        <tr onclick="showMarker(<?php echo $property['id'];?>);" id="result<?php echo $property['id'];?>" 
        <?php 
        if(($i % 2) == 0){ 
            echo "class=\"whitesmokeback\"";
        }else{
            echo "class=\"whiteback\"";
        }
        
        ?> >
            <td width="80px" align="center"><?php echo $property['registerdate'];?></td>
            <td width="70px" align="center"><?php echo $property['offertype'];?></td>
            <td width="75px" align="center"><?php echo $property['type'];?></td>
            <td width="50px" align="center"><?php echo $property['area'];?></td>
            <td width="50px" align="center"><?php echo $property['price'];?></td>
        </tr>

            <?php $i++; }?>
    </tbody>
</table>
</div>

